package ca.camosun.morsecode;

import android.app.Activity;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.content.Intent;

public class MorseModeSelect extends Activity implements OnClickListener {

	Button buttonMode;
	Button tapMode;
	
	
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.morse_mode_select_menu);
		
		buttonMode = (Button) findViewById(R.id.morse_button_mode);
		tapMode = (Button) findViewById(R.id.morse_tap_mode);
		
		buttonMode.setOnClickListener(MorseModeSelect.this);
		tapMode.setOnClickListener(MorseModeSelect.this);
	}

	@Override
	public void onClick(View modeSelected) {

		switch (modeSelected.getId()) {
		
		case (R.id.morse_button_mode):

		    Intent easyMode = new Intent(getApplicationContext(), MorseButtonPadActivity.class);
		    startActivity(easyMode);
			setContentView(R.layout.morse_buttons);
			break;
			
		case (R.id.morse_tap_mode):
			
		    Intent hardMode = new Intent(getApplicationContext(), ManualMorse.class);
		    startActivity(hardMode);
		    setContentView(R.layout.manual_morse);
			break;
			
		}
	}
}
